Week 14. Interface and application programming
- Group assignment:
- Compare as many tool options as possible.
- Document your work on the group work page and reflect on your individual page what you learned.
Scratch
We started by using Scratch for Arduino. S4A is a Scratch modification that allows simple programming some boards of the Arduino open-source hardware platform. It provides new blocks for managing sensors and actuators connected to Arduino. There is also a sensors’ report board similar to the PicoBoard one.
The interface
.png)
Steps
we started testing the program by making simple projects such as blinking led using laptop’s keyboard, and using push button. Arduino objects offer blocks for the basic microcontroller functionalities, analog and digital writes and reads Control the Led with Keyboard key (Space )
.jpg)
.jpg)
Controlling LED using drawn button on S4A
.jpg)
open paint Editor and select the shape of the button , draw it
.jpg)
Select the color of the button
.jpg)
Add or Edit the colors you need
.jpg)
.jpg)
Controlling the LED using external push button
.jpg)
.jpg)
Processing
Individual Assignment :
For this week I’m going to use the same sensors I would use in my final project, I would use an LDR sensor to control the motion of the stepper motor, Omar's documentation helped me to use Processing software. The processing code reads the serial value. so I would use it to show the situation of the motor ( ON/OFF)
.png)
.png)
.png)
I had a problem that takes 2 hours of work, the processing software is responding slowly, so i needed to add a delay for the Arduino code